from django.template.library import Library

register = Library()


@register.filter
def my_lower(value):
    return value.lower()

@register.filter
def add_class(value,classname):
    return value.as_widget(attrs={'class':classname})


@register.simple_tag(name='users')
def get_users():
    from user.models import CustomUser
    return CustomUser.objects.all()